package com.my.cd.decorator;

import com.my.cd.decorator.decorator.Chocolate;
import com.my.cd.decorator.decorator.Milk;

/**
 * 主测试类：咖啡巴
 */
public class CoffeeBar {

    public static void main(String[] args) {
        Drink order;
        order = new Espresso();
        System.out.println("order1 price:" + order.cost());
        System.out.println("order1 desc:" + order.getDesc());

        System.out.println("****************");
        order = new LongBlack();
        order = new Milk(order);
        order = new Chocolate(order);
        order = new Chocolate(order);

        System.out.println("order2 price:" + order.cost());
        System.out.println("order2 desc:" + order.getDesc());
    }
}
